package com.godGuang.consultation.config;

import feign.Feign;
import feign.querymap.BeanQueryMapEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: godGuang-medical
 * @description:
 * @author: godGuang
 * @create: 2024-01-11 22:08
 **/
@Configuration
public class FeignClientCustomizerConfig {
    /**
     * 替换解析 queryMap 的类，实现父类中变量的映射
     * @return
     */
    @Bean
    public Feign.Builder feignBuilder() {
        return Feign.builder()
                .queryMapEncoder(new BeanQueryMapEncoder());
    }
}

